package ribbonconfiguration;

import com.aaron.contentcenter.configuation.NacosFinalRule;
import com.aaron.contentcenter.configuation.NacosSameClusterWeightedRule;
import com.aaron.contentcenter.configuation.NacosWeightedRule;
import com.netflix.loadbalancer.IPing;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.PingUrl;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Description:
 * 该文件需要放在springboot包外层
 * 否则会出现父子上下文扫描类重叠app启动主类外
 * @author linzhj
 * @date 2021/7/11 15:10
 */
@Configuration
public class RibbonConfiguration {

    @Bean
    public IRule ribbonRule(){
        return new NacosFinalRule();
    }
//    @Bean
//    public IPing ping(){
//        return new PingUrl();
//    }
}
